0437b1
@@ -227,6 +227,10 @@
public Object call() throws Exception {
      * before calling this method.
      * </p>
      *
+     * <p>Calling this method will shut down the {@link ExecutorService} used by this class. If any of the {@link
+     * Callable}s {@link #submit}ted to this instance throws an exception, the archive can not be created properly and
+     * this method will throw an exception.</p>
+     *
      * @param targetStream The {@link ZipArchiveOutputStream} to receive the contents of the scatter streams
      * @throws IOException          If writing fails
      * @throws InterruptedException If we get interrupted
@@ -236,11 +240,14 @@
public void writeTo(final ZipArchiveOutputStream targetStream)
             throws IOException, InterruptedException, ExecutionException {
 
         // Make sure we catch any exceptions from parallel phase
+        try {
         for (final Future<?> future : futures) {
             future.get();
         }
-
+        } finally {
         es.shutdown();
+        }
+
         es.awaitTermination(1000 * 60L, TimeUnit.SECONDS);  // == Infinity. We really *must* wait for this to complete
 
         // It is important that all threads terminate before we go on, ensure happens-before relationship
